<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../jeasyui/themes/gray/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../jeasyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../../css/manager.css" />

<script type="text/javascript" src="../../jeasyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../../jeasyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../jeasyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../js/win.js"></script>
<title>小组管理</title>
<script type="text/javascript">

	function addGroup(){
		openUrl("新增小组", 500, 400, "addGroup.jsp");
	}
	
	function reloadDg(){
		$("#dg").datagrid("reload");
		closeWin();
	}

	function refresh(){
		$("#dg").datagrid("reload");
	}
	
	function editGroup(){
		selectOneOpenUrl("#dg","group.do?method=initEdit", 500, 400, "修改", "小组");
	}

	function memberManager(id){
		openUrl("组员管理", 450, 500, "groupUser.jsp?id="+id, refresh);
	}

	function deleteGroup(){
		checkSelectSomeDoAction("#dg", "删除", "小组", "group.do?method=delGroups", true);
	}
	
</script>
</head>
<body>
<div class="dg-content">
	<table id="dg" class="easyui-datagrid" title="小组列表"
		data-options="rownumbers:true,pagination:false,
			fitColumns:true,iconCls:'icon-users',url:'group.do?method=list'">
		<thead>
			<tr>
				<th data-options="field:'ck',checkbox:true"></th>
				<th data-options="field:'id',hidden:true"></th>
				<th data-options="field:'name',width:40,align:'center'">名称</th>
				<th data-options="field:'leader',width:40,align:'center'">组长</th>
				<th data-options="field:'members',width:160,align:'left'">组员</th>
				<th data-options="field:'type',width:40,align:'center'">类型</th>
				<th data-options="field:'opt',width:40,align:'center'">组员管理</th>
			</tr>
		</thead>
	</table>
</div>
<div class="dg-foot">
	<div class='dg-toolbar'>
		<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addGroup()">新增</a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editGroup()">修改</a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleteGroup()">删除</a>
	</div>
</div>
</body>
</html>